package com.jiang.mall.mallorder.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jiang.common.to.mq.SeckillOrderTo;
import com.jiang.common.utils.PageUtils;
import com.jiang.mall.mallorder.entity.OrderEntity;
import com.jiang.mall.mallorder.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author zhangsan
 * @email 2469939264@qq.com
 * @date 2021-03-23 17:06:45
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 给订单确认页返回需要的数据
     * @return
     */
    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    public SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

    OrderEntity getOrderByOrderSn(String orderSn);

    void closeOrder(OrderEntity entity);

    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo);

    void createSeckillOrder(SeckillOrderTo orderTo);
}

